/*
author: weikang.zhao
sinc function interpolation
*/
#define RESAMPLE_FLOAT 0
#define RESAMPLE_INT8 0
#define RESAMPLE_INT16 1

#define IO_FLOAT 0
#define IO_INT16 1

#define SINC_RESAMPLE_K 6
#define SINC_RESAMPLE_INPUT_LEN 160
#define SINC_RESAMPLE_OUTPUT_LEN 441
#define SINC_RESAMPLE_FS_IN 16000
#define SINC_RESAMPLE_FS_OUT 44100

#if IO_FLOAT
typedef float sinc_scalar;
#elif IO_INT16
typedef short sinc_scalar;
#endif



struct sincresampler {
	int fs_in;
	int fs_out;
	int input_len;
	int output_len;
	sinc_scalar* table;
};
struct sincresampler* sincresamplerInit();
void sincresamplerProcess(struct sincresampler* inst, sinc_scalar* input, sinc_scalar* output);
void sincresamplerDestory(struct sincresampler* inst);
